package com.ruoyi.user.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 用户优惠券绑定表 user_coupons
 */
public class UserCoupon extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 用户优惠券ID */
    @Excel(name = "用户优惠券ID")
    private Long userCouponId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long customerId;

    /** 优惠券ID */
    @Excel(name = "优惠券ID")
    private Long couponId;

    /** 使用状态：0-未用，1-已用，2-过期，3-作废 */
    @Excel(name = "使用状态")
    private Integer status;

    /** 领取时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "领取时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date acquiredAt;

    /** 使用时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "使用时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date usedAt;

    /** 使用订单ID */
    @Excel(name = "使用订单ID")
    private Long orderId;

    /** 过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "过期时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date expireAt;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updatedAt;

    /** 删除时间（软删除） */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "删除时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date deletedAt;

    /** 预留字段1 */
    private String externField1;

    /** 预留字段2 */
    private String externField2;

    public Long getUserCouponId() { return userCouponId; }
    public void setUserCouponId(Long userCouponId) { this.userCouponId = userCouponId; }

    public Long getCustomerId() { return customerId; }
    public void setCustomerId(Long customerId) { this.customerId = customerId; }

    public Long getCouponId() { return couponId; }
    public void setCouponId(Long couponId) { this.couponId = couponId; }

    public Integer getStatus() { return status; }
    public void setStatus(Integer status) { this.status = status; }

    public Date getAcquiredAt() { return acquiredAt; }
    public void setAcquiredAt(Date acquiredAt) { this.acquiredAt = acquiredAt; }

    public Date getUsedAt() { return usedAt; }
    public void setUsedAt(Date usedAt) { this.usedAt = usedAt; }

    public Long getOrderId() { return orderId; }
    public void setOrderId(Long orderId) { this.orderId = orderId; }

    public Date getExpireAt() { return expireAt; }
    public void setExpireAt(Date expireAt) { this.expireAt = expireAt; }

    public Date getCreatedAt() { return createdAt; }
    public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; }

    public Date getUpdatedAt() { return updatedAt; }
    public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; }

    public Date getDeletedAt() { return deletedAt; }
    public void setDeletedAt(Date deletedAt) { this.deletedAt = deletedAt; }

    public String getExternField1() { return externField1; }
    public void setExternField1(String externField1) { this.externField1 = externField1; }

    public String getExternField2() { return externField2; }
    public void setExternField2(String externField2) { this.externField2 = externField2; }

    @Override
    public String toString() {
        return "UserCoupon{" +
                "userCouponId=" + userCouponId +
                ", customerId=" + customerId +
                ", couponId=" + couponId +
                ", status=" + status +
                ", acquiredAt=" + acquiredAt +
                ", usedAt=" + usedAt +
                ", orderId=" + orderId +
                ", expireAt=" + expireAt +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                ", deletedAt=" + deletedAt +
                ", externField1='" + externField1 + '\'' +
                ", externField2='" + externField2 + '\'' +
                '}';
    }
}